﻿<div id="header" class="navbar navbar-inverse navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container-fluid">
            <a class="brand bold" href="@Url.Action("Default", "Home")">CleverCMS</a>
            <div class="top-nav ">
                @if (User.Identity.IsAuthenticated)
                {
                    <ul class="nav pull-right top-menu">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <img src="@Url.Content("~/Content/Images/avatar1_small.jpg")" alt="">
                                <span class="username">@User.Identity.Name</span>
                                <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu extended logout">

                                @if (User.IsInRole("admin"))
                                {
                                    <li><a href="@Url.Action("Index", "Dashboard", new { area = "CleverCms.Admin" })"><i class="icon-user"></i>Admin area</a></li>    
                                }

                                <li><a href="@Url.Action("Edit", "Account")"><i class="icon-cog"></i>My Profile</a></li>
                                <li><a href="@Url.Action("LogOff", "Account")"><i class="icon-key"></i>Log Out</a></li>
                            </ul>
                        </li>
                    </ul>
                    }
                else
                {
                    <ul class="nav pull-right top-menu">
                        @if (!User.Identity.IsAuthenticated)
                        {
                            <li class="dropdown">
                                <a href="/account/register" class="dropdown-toggle">Register</a>
                            </li>
                         }
                        <li class="dropdown">
                            <a href="/auth/login" class="dropdown-toggle">Login</a>
                        </li>
                    </ul>
                }
            </div>
        </div>
    </div>
</div>
